package com.rongxue.mapper;

import com.rongxue.pojo.SUserDueDetail;
import com.rongxue.pojo.SUserDueDetailExample;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface SUserDueDetailMapper {
    int countByExample(SUserDueDetailExample example);

    int deleteByExample(SUserDueDetailExample example);

    int deleteByPrimaryKey(Long id);

    int insert(SUserDueDetail record);

    int insertSelective(SUserDueDetail record);

    List<SUserDueDetail> selectByExample(SUserDueDetailExample example);

    SUserDueDetail selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") SUserDueDetail record, @Param("example") SUserDueDetailExample example);

    int updateByExample(@Param("record") SUserDueDetail record, @Param("example") SUserDueDetailExample example);

    int updateByPrimaryKeySelective(SUserDueDetail record);

    int updateByPrimaryKey(SUserDueDetail record);

    //根据时间查询出标的详细信息
    List<SUserDueDetail> selectDueDetailByTime(@Param("repTime") String repTime,@Param("projectId") String projectId);

    //分类查询出到期的标
    List<SUserDueDetail> selectProjectCountByTime(String repTime);

    List<SUserDueDetail> selectDueDetailByMap(Map<String,Object> map);
    //查询最后一条投资成功记录
    SUserDueDetail selectUserDueDetailLast(String userId);
    //累计投资金额
    BigDecimal selectTotalIntervest();

    List<SUserDueDetail> selectRank();

    //借款记录详情
    List<SUserDueDetail> selectUserDueDetailLastByProjectId(String projectId);
    //根据订单查询投资记录
    SUserDueDetail selectUserDueDetailByRechargeno(String recharge_no);
    //查询标投资最多的人
    SUserDueDetail selectInvestmentMax(String projectId);
}